package org.example.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class user {
    //在数据表中 id 为自增 那么在类中也要给对应的属性添加自增效果
    //value 代表中的字段    type = IdType.AUTO表示主键为自动递增
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;
    private String name;
    private String password;
    private Integer age;
    private String tel;

    public user(Long id, String tel, Integer age, String password, String name) {
        this.id = id;
        this.tel = tel;
        this.age = age;
        this.password = password;
        this.name = name;
    }
}
